package com.huijiet.base.component;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "home.param")
@PropertySource(value = {
        "classpath:env-${spring.profiles.active}/param-${spring.profiles.active}.properties"
})
@Data
public class GlobalParam {

    private JwtParam jwt;
    private ImgParam img;

    @Data
    public static class JwtParam{
        private String password;        //jwt加密的密码
        private Integer expireValid;    //是否校验超时(0:否,1:是)
        private Long expireTime;        //过期时间毫秒数
    }

    @Data
    public static class ImgParam{
//        private boolean withJar;    //是否以jar包方式启动
//        private String imgLocation; //图片文件目录
//        private String imgPrefix;   //图片访问前缀

        private Integer dev;
        private String imgLocation;
        private Integer startJar;
        private String prefix;
    }
}
